package team.hyznrj.studentsys.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import team.hyznrj.studentsys.dto.ResultDto;
import team.hyznrj.studentsys.service.FunctionService;
import team.hyznrj.studentsys.utils.ResultUtil;

/**
 * @author ReMidDream
 * @date 2018-05-09 13:15
 **/
@Api(value = "FunctionController", description = "功能接口")
@RestController
@RequestMapping("/function")
public class FunctionController {

    @Autowired
    private FunctionService functionService;


    @ApiOperation(value="查询所有功能")
    @GetMapping("/fAllFunction")
    public ResultDto<?> findAllFunction(){
        return ResultUtil.Success(functionService.findAll());
    }

}
